﻿<!DOCTYPE html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>工蜂引流</title>
    <!-- plugins:css -->
    <link rel="stylesheet" href="vendors/iconfonts/mdi/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="vendors/css/vendor.bundle.base.css">
    <!-- endinject -->
    <!-- inject:css -->
    <link rel="stylesheet" href="css/style.css">
    <link href="js/umeditor/themes/default/css/umeditor.min.css" rel="stylesheet" />
    <!-- endinject -->
    <link rel="shortcut icon" href="images/logo.png" />
</head>
<body class="main">
    <div class="container-scroller">
        <div class="container-fluid page-body-wrapper" style="padding-top:0 !important;">
            <!-- partial:partials/_sidebar.html -->
            <nav class="sidebar sidebar-offcanvas" id="sidebar">
                <ul class="nav" style="position: fixed;top: 0;width: 260px;left: 0;">
                    <li class="nav-item nav-profile">
                        <a href="#" class="nav-link">
                            <div class="nav-profile-image">
                                <img src="images/faces/face1.jpg" alt="profile">
                                <span class="login-status online"></span>
                            </div>
                            <div class="nav-profile-text d-flex flex-column">
                                <span class="font-weight-bold mb-2">承诺一时的华丽</span>
                                <span class="text-secondary text-small">快速分发平台</span>
                            </div>
                            <i class="mdi mdi-bookmark-check text-success nav-profile-badge"></i>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="index.html">
                            <span class="menu-title">主页</span>
                            <i class="mdi mdi-home menu-icon"></i>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-toggle="collapse" href="#ui-basic" aria-expanded="false" aria-controls="ui-basic">
                            <span class="menu-title">实时新闻</span>
                            <i class="menu-arrow"></i>
                            <i class="mdi mdi-crosshairs-gps menu-icon"></i>
                        </a>
                        <div class="collapse" id="ui-basic">
                            <ul class="nav flex-column sub-menu">
                                <li class="nav-item"> <a class="nav-link" href="pages/ui-features/buttons.html">设置关键词</a></li>
                                <li class="nav-item"> <a class="nav-link" href="pages/ui-features/typography.html">新闻列表</a></li>
                            </ul>
                        </div>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="pages/icons/mdi.html">
                            <span class="menu-title">一键分发</span>
                            <i class="mdi mdi-contacts menu-icon"></i>
                        </a>
                    </li>
                </ul>
            </nav>
            <!-- partial -->
            <div class="main-panel">
                <div class="content-wrapper" style="padding-top:20px !important;">
                    <div class="page-header">
                        <h3 class="page-title">
                            <span class="page-title-icon bg-gradient-primary text-white mr-2">
                                <i class="mdi mdi-home"></i>
                            </span>
                            数据分发
                        </h3>
                        <nav aria-label="breadcrumb">
                            <ul class="breadcrumb">
                                <li class="breadcrumb-item active" aria-current="page">
                                    <span></span>工蜂引流
                                    <i class="mdi mdi-alert-circle-outline icon-sm text-primary align-middle"></i>
                                </li>
                            </ul>
                        </nav>
                    </div>
                    <div class="row">
                        <div class="col-12 grid-margin">
                            <div class="card">
                                <div class="card-body">
                                    <h4 class="card-title">一件分发需要 提前登录账号</h4>
                                    <div class="table-responsive">
                                        <table class="table table-striped">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        平台
                                                    </th>
                                                    <th>
                                                        操作
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>
                                                        新浪微博
                                                    </td>
                                                    <td>
                                                        <a href="https://weibo.com" target="_blank" class="btn btn-gradient-primary btn-sm">前去登录</a>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        今日头条
                                                    </td>
                                                    <td>
                                                        <a href="https://www.toutiao.com/" target="_blank" class="btn btn-gradient-primary btn-sm">前去登录</a>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">

                        <div class="col-12 grid-margin">
                            <div class="card">
                                <div class="card-body">
                                    <form class="forms-sample">
                                        <div class="form-group row">
                                            <label for="exampleInputUsername2" class="col-sm-2 col-form-label">标题</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="title" placeholder="请输入文章标题">
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label for="exampleInputEmail2" class="col-sm-2 col-form-label">内容</label>
                                            <div class="col-sm-10">
                                                <textarea id="content" name="content" placeholder="请输入发送邮件内容" style="display: none"></textarea>
                                                <div id="content_div"></div>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label for="exampleInputEmail2" class="col-sm-2 col-form-label">发送平台</label>
                                            <div class="col-sm-10">
                                                <div class="platform">
                                                    <button type="button" class="btn btn-outline-success btn-fw" data-type="新浪微博">新浪微博</button>
                                                    <button type="button" class="btn btn-outline-success btn-fw" data-type="今日头条">今日头条</button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="text-right">
                                            <button id="sendBtn" type="button" class="btn btn-gradient-primary mr-2">确认分发</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- content-wrapper ends -->
                <!-- partial:partials/_footer.html -->
                <footer class="footer" id="footer">
                    <div class="d-sm-flex justify-content-center justify-content-sm-between">
                        <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">Copyright © 2017 <a href="http://www.9ee3.com/" target="_blank">工蜂小智</a>. All rights reserved. </span>
                        <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">

                        </span>
                    </div>
                </footer>
                <!-- partial -->
            </div>
            <!-- main-panel ends -->
        </div>
        <!-- page-body-wrapper ends -->
    </div>
    <!-- container-scroller -->
    <!-- plugins:js -->
    <script src="vendors/js/vendor.bundle.base.js"></script>
    <script src="vendors/js/vendor.bundle.addons.js"></script>
    <!-- endinject -->
    <!-- Plugin js for this page-->
    <!-- End plugin js for this page-->
    <!-- inject:js -->
    <script src="js/off-canvas.js"></script>
    <script src="js/misc.js"></script>
    <!-- endinject -->
    <!-- Custom js for this page-->
    <script src="js/dashboard.js"></script>
    <!-- End custom js for this page-->
    <script src="js/layer/layer.js"></script>
    <script src="js/common.js"></script>
    <script src="js/umeditor/third-party/template.min.js"></script>
    <script src="js/umeditor/umeditor.config.js"></script>
    <script src="js/umeditor/umeditor.min.js"></script>
    <script src="js/umeditor/lang/zh-cn/zh-cn.js"></script>
    <script>
        var um;
        $(function () {
            um = UM.getEditor('content_div', {
                focus: true
            });

            $(".platform button").click(function () {
                if ($(this).hasClass('btn-outline-success')) {
                    $(this).removeClass('btn-outline-success').addClass('btn-gradient-success');
                } else {
                    $(this).removeClass('btn-gradient-success').addClass('btn-outline-success');
                }
            });
            $("#sendBtn2").click(function () {
                objectJS.openForm({ "name": "add", "windowMax": true, "windowMin": false, "max": true, "min": true, "display": true, "title": "一键分发", "url": "\\\\page\\\\index.html", "width": 480, "height": 600, "successFunc": "successFunc" });
            });
            $("#sendBtn").click(function () {
                var title = $("#title").val();
                var content = um.getContent();
                var type = new Array();
                $.each($(".platform button.btn-gradient-success"), function (i, item) {
                    type.push($(item).attr('data-type'));
                });
                if (type.length <= 0) {
                    layer.msg("请选择发送平台");
                    return;
                }
                var data = {};
                data.title = title;
                data.content = content;
                data.type = type.join(',');
                //更新使用次数
                objectJS.updateUseCount();
                objectJS.openForm({ "name": "sendForm", "windowMax": true, "windowMin": false, "max": true, "min": true, "display": true, "title": "一键分发", "url": "\\\\page\\\\send.html", "data": JSON.stringify(data) });
            });

        });
    </script>
</body>

</html>
